<ion-view view-title="我的加盟店" class="myagent">
	
  <ion-content>
  	
     <div class="row padding-0 text-center font-large-my" id="distributor-top1">
      	 <div class="col borderRight_my assertive" data-authname="加盟店一览" rights-ctrl>加盟店一览</div><!--第一个不用加链接-->
      	 <div class="col borderRight_my" on-tap="onshow_menu(1)">添加加盟店</div>
      	 <div class="col borderRight_my" on-tap="onshow_menu(2)" data-authname="我要找加盟店" rights-ctrl>寻找加盟店</div>
      	 <!--<div class="col col-20" on-tap="onshow_menu(3)">黑名单</div>-->
      </div>
       <!--地域和搜索框不要-->
        <!--<div class="item item-input">
        	<i class="icon ion-ios-list-outline royal"></i>
        	加盟店一览
        </div>-->
        <ion-scroll direction="y" ng-style="distributor_myObj" lazy-scroll>
		<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
		<div class="list" ng-repeat="num in datas.store">
			<li class="item item-thumbnail-left" style="padding-right: 5px;">
				<img src="{{num.image}}" ng-if="num.image" on-tap="go_store(num.store_id)" />
				<img src="{{noImg}}" ng-if="num.image==''||num.image==null" on-tap="go_store(num.store_id)" />
				<p on-tap="go_store(num.store_id)"><b>{{num.store_name}}</b></p>
				<p>
					已授信额度：{{num.credit_line|currency:'￥'}}
					<i class="icon ion-compose positive right-zhang font-1rem-my" on-tap="onshow_menu(1,num.store_id)"></i>
					<!--<input ng-model="num.credit_line" placeholder="授信额度" class="font-large-my" style="width:35%;"/>-->
					<!--<span class="bian_red assertive right-zhang font-small-my border-radius-my" on-tap="credit_change(num.store_id,num.credit_line)">&nbsp;修改额度&nbsp;</span>-->
				</p>
				<div style="position: absolute; bottom: 10px;">
					<i class="icon ion-person font-large-my positive"></i><span class="font-large-my">&nbsp;{{num.contact_name}}</span>
					<a href="tel:{{num.contact_mobile}}" class="font-large-my"><i class="icon ion-ios-telephone" style="margin-left: 1.5rem;"></i>{{num.contact_mobile}}</a>
				</div>
			</li>
		<li class="item padding-0">
			<div class="row padding-0 font-middle-my">
				<div class="col">当月订单量: <span class="royal">{{num.this_order_count}}</span></div>
				<div class="col">当月订单金额：<span class="royal">{{num.this_order_money|currency:"￥"}}</span></div>
			</div>
			<div class="row padding-0 font-middle-my">
				<div class="col">上月订单量: {{num.last_order_count}}</div>
				<div class="col">上月订单金额：{{num.last_order_money|currency:'￥'}}</div>
			</div>
		</li>
		<!--<li  class="item item-borderless padding-5 ">
			<p><span ng-show="num.brand.length==0">代理品牌：暂无代理品牌</span></p>
		</li>
		<li class="item item-borderless padding-5" ng-repeat="brand in num.brand" >
			 <p>
			 	<span  ng-class="{invisible:$index>0}">代理品牌：</span>{{brand.brand_name}}
			 	<span class="bian_red assertive right-zhang font-small-my border-radius-my" ng-show="!brand.is_price" on-tap="price_change(num.store_id,brand.id,brand.is_price)">&nbsp;可修改价格&nbsp;</span>
			 	<span class="bian_red assertive right-zhang font-small-my border-radius-my" ng-show="brand.is_price" on-tap="price_change(num.store_id,brand.id,brand.is_price)">&nbsp;不可修改价格&nbsp;</span>
			 </p>
		</li>
		<li  class="item item-borderless padding-5">
			<p><span ng-show="num.store_cat.length==0">代理品类：暂无代理品类</span></p>
		</li>
		<li class="item item-borderless padding-5" ng-repeat="cat in num.store_cat">
		     <p><span ng-class="{invisible:$index>0}">代理品类：</span>{{cat.store_cat_name}}</p>
		</li>
		<li class="item item-borderless padding-5">
			<p><span ng-show="num.region.length==0">代理区域：暂无</span></p>
		</li>
		<li class="item item-borderless padding-5"ng-repeat="region in num.region">
		     <p> <span ng-class="{invisible:$index>0}" >代理区域：</span>{{region.region}}</p>
		</li>
		<li class="item item-borderless item-text-wrap padding-5 ">
		  <p>介绍：<span>{{num.company_profile}}</span>
		  </p>
		</li>-->
		<!--<li class="item item-borderless padding-0" style="padding-bottom:8px;">
		 	<div class="row font-large-my padding-0 text-center">
		 		<!--<div class="col bian_gray" ng-show="!store.is_price" on-tap="price_change(num.store_id,!store.is_price)">允许修改价格</div>&nbsp;
		 		<div class="col bian_gray" ng-show="store.is_price" on-tap="price_change(num.store_id,store.is_price)">不允许修改价格</div>&nbsp;-->
		 		<!--<div class="col bian_gray" on-tap="showPopup(num.store_id)">加入黑名单</div>&nbsp;
		 	</div>
		</li>-->
		<li class="item item-borderless padding-0" style="padding-bottom:8px;">
		 	<div class="row font-large-my padding-0 text-center">
		 		&nbsp;<div class="col bian_gray" on-tap="onshow_button(1,num.store_id)">查看订单</div>&nbsp;
		 		<div class="col bian_gray" on-tap="onshow_button(2,num.store_id)" data-authname="授信还款" rights-ctrl>授信还款</div>&nbsp;
		 		<div class="col bian_gray assertive" on-tap="delete_button(num.store_id)"><i class="ion-ios-close-outline assertive"></i>删除</div>&nbsp;
		 		<div class="col bian_gray" on-tap="showPopup_red(num.store_id)">发红包</div>&nbsp;
		 	</div>
		</li>
    </div>
    
    <!--描述：拉黑的输入模块，当点击时弹出-->
     <!--<script type="text/ng-template" id="distributor_defriend.html">
     	  <textarea rows="8" placeholder="请输入原因" ng-model="scope.reason"></textarea>
     </script>-->
     <ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
	</ion-scroll> 
  </ion-content>
</ion-view>
